#include <iostream>
using namespace std;
/*
Write two classes, 
each of which has a member function that takes a pointer to an object of the other class. 
Create instances of both objects in main(),
and call the aforementioned member function in each class.
*/
class C1;
class C2;

class C1
{
public:
    void function1(C2 *point)
    {
        cout << "function1 is called." << endl;
    }
};

class C2
{
public:
    void function2(C1 *point)
    {
        cout << "function2 is called." << endl;
    }
};

int main()
{
    C1 c1;
    C2 c2;
    c1.function1(&c2);
    c2.function2(&c1);

    return 0;
}